package com.by.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.context.request.ServletWebRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@SuppressWarnings({"all"})
public class IndexController {

	private Logger log = LoggerFactory.getLogger(IndexController.class);

	private static final String CMN_PREFIX = "/cmn";

	/**
	 * 后台主页
	 * @param request
	 * @param response
	 * @return
	 */
	@GetMapping("/index")
	//@RequiresRoles(value= {"ROLE_SUPER","ROLE_ADMIN","ROLE_USER"}, logical=Logical.OR)
	public String accessAdminPageGet(HttpServletRequest request, HttpServletResponse response) {
		ServletWebRequest webRequest = new ServletWebRequest(request, response);

		return CMN_PREFIX + "/index";
	}
}
